input_string = input('Please input a string: \n')

# test_str_1 = 'He said, "I was only 14 when I first came to Beijing."'
# test_str_2 = 'The quick brown fox jumps over the lazy dog.'
# print('The string is', test_str_1)
# print('The string is', test_str_2)

numbers_of_letters = 0
numbers_of_digit = 0
numbers_of_spaces = 0
numbers_of_other_characters = 0

for i in input_string:
    if i.isalpha(): numbers_of_letters += 1
    elif i.isalnum(): numbers_of_digit += 1
    elif i.isspace(): numbers_of_spaces += 1
    else: numbers_of_other_characters += 1

print('numbers_of_letters:         ', numbers_of_letters)
print('numbers_of_digit:           ', numbers_of_digit)
print('numbers_of_spaces:          ', numbers_of_spaces)
print('numbers_of_other_characters:', numbers_of_other_characters)
